package cn.edu.njust.alg.leetcode;

public class Leetcode_226_Invert_Binary_Tree {

	public static TreeNode invertTree(TreeNode root) {
		if (root == null) {
			return null;
		}
		invertTree(root.left);
		invertTree(root.right);
		TreeNode tmpNode = root.left;
		root.left = root.right;
		root.right = tmpNode;

		return root;
	}

	public static void main(String[] args) {

	}

}
